<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
</head>
<body>
   
    <div  id="app">
        <!--将输入框中的值与 data 中的 num 值进行绑定-->
        <input type="text" v-model="num">
        <button v-on:click="num++">觉得wanqing好看</button>
        <button v-on:click="cancle">取消喜欢</button>
        <h1>{{name}}， 非常好看~~,有{{num}}个人也这么觉得</h1>
    </div>

    <script src="./node_modules/vue/dist/vue.js"></script>
    
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                name: "wanqing",
                num: 1
            },
            methods: {
                cancle(){
                    this.num--;
                }
            }
        });

    </script>
</body>
</html>